#include "utilities.h"
//
Utilities::Utilities(  ) 
{
	// TODO
}

QString Utilities::addParameter ( QString baseUrl, QString parameter, QString value)
{	
    // insert the '?' if needed
    int qLocation = baseUrl.lastIndexOf ('?');
    if (qLocation < 0)
    {
        baseUrl += "?";
        qLocation = baseUrl.length() - 1;
    }

    if (baseUrl.length() > qLocation + 1)
        baseUrl += "&";

    baseUrl += parameter + "=" + value;
    return baseUrl;
}
